package com.xbongbong.saas.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;
import com.xbongbong.paas.enums.FieldTypeEnum;
import com.xbongbong.paas.enums.ScreenTypeEnum;
import com.xbongbong.saas.enums.business.ClueEnum;
import com.xbongbong.saas.enums.business.CustomerManagementEnum;
import com.xbongbong.saas.enums.business.SalesOpportunityEnum;
import lombok.Getter;

import java.util.Objects;

/**
 * @author 李翔
 * @date 2022/11/14
 * @description
 */
@Getter
public enum VisibleRangeEnum {

    VISIBLE_DEPT("array_29", "visbleDept", "enum.saasVisibleRange.attrName.visible_dept", FieldTypeEnum.DEPT_GROUP.getType()),
    VISIBLE_USER("array_30", "visbleUser", "enum.saasVisibleRange.attrName.visible_user", FieldTypeEnum.USER_GROUP.getType()),
    ;

    /**
     * 属性
     */
    private String attr;
    /**
     * saasAttr
     */
    private String saasAttr;
    /**
     * 属性名称
     */
    private String attrName;
    /**
     * 字段类型，详见
     *
     * @see com.xbongbong.paas.enums.FieldTypeEnum
     */
    private Integer fieldType;

    VisibleRangeEnum(String attr, String saasAttr, String attrName,Integer fieldType) {
        this.attr = attr;
        this.saasAttr = saasAttr;
        this.attrName = attrName;
        this.fieldType = fieldType;
    }

    public String getAttrName() {
        return I18nMessageUtil.getMessage(attrName);
    }


}
